<?php
error_reporting(0);
require_once('lib.php');
session_start();
if(login()){
	$log = true;
}else{
	$log = false;
}

if($log){
    echo "<select name=\"pname\" size=\"1\">\n";	
	if($_GET['position']==0) echo "<option value=\"0\">ไม่มีผู้ดำรงตำแหน่ง</option>";
	else{	
	    $ans = getPG("select * from view_pname where position_id=".$_GET['position']." and pname_status='t';");

	    foreach($ans as $dat){
		    echo "<option value=\"".$dat['pname_id']."\">".$dat['pname_name']."</option>\n";
	    }
	
    }
    echo "</select>\n";

}else{
	echo "Sorry ! ....";
}
?>
